<template>
	<view class="box">
		首页
	</view>
</template>

<script>
	export default {
		data() {
			return {
				locationInfo: {},
			};
		},
		onLoad(options) {},
		onShow() {
			uni.getLocation({
				type: 'wgs84',
				geocode: true,
				success: ((res) => {
					console.log(res)
					console.log('当前位置的经度：' + res.longitude);
					console.log('当前位置的纬度：' + res.latitude);
					this.locationInfo = {
						longitude: res.longitude,
						latitude: res.latitude
					}
				}),
				fail: ((res) => {
					console.log(res)
					this.$u.toast("定位失败！")
				})
			});
		},
		methods: {
			getSong() {

			},
		}
	};
</script>

<style lang="scss">
	page {
		.box {}
	}
</style>
